<template>
	<div class="fast-asked">
		<div class="asked_top">
			<div class="top_img">
				<img src="@/assets/question/asked_topimg_03.png" alt="">	
				<div class="top_info">
					<div>
						<p>自主提出一个问题</p>
						<p>平台大师以最快的速度</p>
						<p>为您解疑答惑 并可继续追问</p>
					</div>
					<span @click="byOrder">立即咨询</span>
				</div>
			</div>
			<div class="info">
				<span>{{fQnum.ceshi}}人已测试</span>
				<span class="ques_num">{{fQnum.zhuiwen}}次追问</span>
			</div>
		</div>
		<div class="asked_list">
			<template v-if="fQlist.length">
				<free-watch v-for="(item,index) in fQlist" :key="index" :item="item"></free-watch>
			</template>
			<div class="asked_tips" v-else>
				<p>暂无问答~</p>
			</div>
		</div>			
	</div>
    
</template>
<script>
import freeWatch from "@/components/freeWatch";

export default {
	components: {
		freeWatch
	},
	data(){
		return{
			fQnum:{},
			fQlist:[],

		}
	},
	created(){
		this.getQuesNumber();
		this.getFQlist();
	},
	methods:{
		getFQlist(){
        this.$http.fetchGet("getFq2Consultance", {
					limit:3,
					questionType:2,
        }).then(({ data }) => {
					data && (this.fQlist = data) ;
					console.log(data,'偷偷');
				})
		},
		getQuesNumber(){
			this.$http.fetchGet("getFlashNumber").then(({data}) => {
				this.fQnum = data;
			})
		},
		byOrder(){
			this.$router.push({
				path: '/pay',
				query: {
					step: 0,
				}
			});
		}
	}
}
</script>

<style scoped lang="less">
	.fast-asked{
		.asked_top{
			padding: .28rem .266667rem .4rem;
			border-bottom: .266667rem solid #F2F2F2;
		}
		.top_img{
			width: 100%;
			position: relative;
			overflow: hidden;

			img{
				width: 100%;
				display: block;
			}
			.top_info{
				position: absolute;
				left: 50%;
				top: .533333rem;
				p{
					font-size: .32rem;
					color: #666;
					line-height: .48rem;
				}
				span{
					display: block;
					width: 2.613333rem;
					height: .88rem;
					text-align: center;
					line-height: .88rem;
					border: 1px solid #189BEB;
					color: #189BEB;
					border-radius:.133333rem;
					margin-top: .266667rem;
					box-sizing: border-box;
				}
			}
		}
		.info{
			padding: 0 .266667rem;
			height: 1.066667rem;
			line-height: 1.066667rem;
			.flex();
			.justify-content(space-between);
			color: #666;
			font-size: .346667rem;
			border: 1px solid #f1f1f1;
			border-top: 0;
			border-radius: .133333rem;
			.ques_num{
				color: #189BEB;
			}
		}
		.asked_list{
			.asked_tips{
				margin-top: 30px;
				text-align: center;
				color: #999;
				font-size: .373333rem;
			}
		}	
	}
</style>

